Cleanup and tests WIP