Cleanup and some test additions