Added comments & refractored class