Commit 21/09/2014

Finishing commenting source files and correcting some bugs