Minor refactorings & simplifications
Merge pull request #5 from dhruvasagar/master

Minor refactorings & simplifications