applied bootstrap formatting to flash messages
more complete testing and error handling