Cleanup + minor fixes