Updated mode functions to switch from play mode to edit mode