Tidying up code a little.