Edit mode button now sets necessary variables