Cleanup and simplification.