Tidying up the code.