Added some comentaries and improved whitespace in file