Tidying up of code.