Removed commented code and other random things
Added necessary documentation and re-formatted code to match 80 column width