Added some more functionality to the form