Added some functionality to the form