Better naming and general tidying-up.