cleanup, fix tests