Fixed some bugs for the edit option, deleted file