updated comments, added upload form condition and test, fixed copy/paste bug in HTML render params