Merge pull request #62 from chathhorn/master

Fix warnings + other minor refactoring