Version 1.0.1: lots of refactors, tests