documentation and code cleanup
refactored code to generated code editor contents