Added form reset on add/update click
Moved helper methods