I'm going to move the contents of this function out into a separate function to make sure that it isn't encapsulated inside of the initialisation function.