Completed everything up to validating the form