Started to add comments explaining code
Refactored code indentation and styles