Worked out a bug in pausing
Refactored pause listener