Incorporating feedback part 2 - fixed code style and comments