This file is really big - should probably be split up.

There's also plenty of opportunity for refactoring out common tests.

Very cool though.