added jquery flash message confirmation and changes some styling, did
general code refactoring and cleaning up.