Clean up, fix failing tests