Cleanup + script fixes