$RUNTIME_APPTYPES is no longer used - left over from pre OC4
html input tag has no closing tag
typos, indentation and remove of unused code