Optimize Pausing / Unpausing + Stopping

Optimized code for pausing, unpausing, and stopping actions.
Added 3 subs: unpause, pause, and terminate.