Migrate to Minitest for testing

More straightforward, so easier to understand. Squashed some bugs and fixed some edge cases in the process. 

API specs will follow.