Tidying up some code.