Updated to handle the square button as delete