Tidied up things for 2.4+