Added custom submit handler code and improved hook form_FORM_ID_alter().