Start of refactoring to complete level loader.