Fixed form submit code and code cleanup