Refactored the level object