some cleanup and more tests, more required