Added exit and connect methods.