Finished tidying up core
Finished tidying up, adding tests
More tests