Basic tidy up of the modesInit() function