Conversion of user input to index of deletion moved to "edit" method, instead of placing it in "executeCommand".