removing unneeded java files and added exception handling for undo button