a spot of refactoring to make things look nicer and behave less hackishly
Merge pull request #1 from AlexNisnevich/master

A spot of refactoring to make things look nicer and behave less hackishly