Refactor how level state is stored, allowing for unlocked state also. #3 #5