fix tests, some cleanup