Fixes in Appointment model and views.

Also cleaned up the controller a bit.