big cleanup (work-in-progress)