Add previous level and next level editing logic.