Made some small adjustments to the form_alter function.