modified alert styling and flash messge code