Fixed some bugs with visit

Now checks for appointment, and deletes from appointment when submitted