Added and improved comments of methods.
Removed unnecessary whitespaces.