Formatting and comments
Added lots of comments