Form code clean-up