Added function to reset exit signal. Fixed up erroneous sensor numberings.