Revert "Merge pull request #7 from wilg/refactor"

This reverts commit 6db392b3752026d4e9c69b4936c8c222a4319d60, reversing
changes made to b30ed800ab8229288cba13a8a4623cbc57f41fa7.