Backend code review and cosmetic fixes
Merge pull request #69 from anryko/master

Backend code review and cosmetic fixes