Added test and cleaned up code formatting Review based changes Converting class method and attributes to private