fixed some formatting and added comments
Merge pull request #61 from TomaQ/fix_formatting_and_comments

fixed some formatting and added comments