Tidy up the code based on Ben's comments