Cleanup and simplification