Some minor cleanup. Added flash message