some tidy up of the handlers