code cleanup continues, its now well-commented, atleast according to me, and looks good. Time to finish it off by updating the readme