Add initial leveling code