Working on some editing logic