Added form and controller functions.