4-refactoring

Closes https://github.com/psycholold/SensorReader/issues/4