Added tests. Lots of tests. Like 1000+ assertions worth of tests. It's stupid, really.