Cleaning

Tried to clean up the code and get the indentions right
Have better eyes looks over it