Removed unused code in generated code.
Added another test.