23 fix onpause

The two commits that actually fix the issue are:

- https://github.com/psycholold/SensorReader/commit/7263d247fac3618777f3723a1a4cd263c3130837
- https://github.com/psycholold/SensorReader/commit/89dabeead07302666c11c99e2590569f44f80d0c

The others are cleanup and formatting.

Closes #23