Moved some code out of the load function