Merge pull request #76 from polynickglot/master

Lots o' refactoring