Cleanup and simplify