Refactored form submit into separate callbacks