Cleanup + fix history