Refactoring the code to make it a bit more readable
committing latest changes
Fix the output messages
Added some comments at the top, to ready for submission