Added continuity and exit functionality
Merging...