-- added most of the functionality for handling levels to the level manager.