Conversion of user input to index of deletion moved to "delete" method, instead of placing it in "executeCommand".
Added test cases.