Refactor form transition to a more modular form (hehe, it's a pun)