cleanup unit test, remove legacy tests, fix broken tests