Cleanup of code and commented out the "end element-end-record" code.