Major improvements to pause/resume functionality.

#4, #14