converted availabilities index to AJAX and form to form helper
same as below
fixed appearance of flash messages