[WIP] Tests

Can in theory be merged - just have some tests to write still.