Cleanup code round 1