clean up & fix tests