Finish adding support for exit conditions