submitEdit work

Moved variable declarations inside if loop in order to avoid unnecessary
usage. Also began trying to get the function to remove the item if enter
is pressed with nothing in the item's entry field.