A round of cleanup and simplification