tidying up and error flashes added
removing underscore as I didnt use it