Refactor form saving into behavior.