Clean up method definitions and return statements.