Starting adding tests, some cleanup