Improved whitespace, added comments