Refactored things a bit to remove a bit of repetition
Refactored things a bit to remove a bit of repetition

Salandora/OctoPrint,foosel/OctoPrint,JackGavin13/octoprint-test-not-finished,foosel/OctoPrint,Jaesin/OctoPrint,foosel/OctoPrint,JackGavin13/octoprint-test-not-finished,Salandora/OctoPrint,JackGavin13/octoprint-test-not-finished,Salandora/OctoPrint,Jaesin/OctoPrint,foosel/OctoPrint,JackGavin13/octoprint-test-not-finished,Jaesin/OctoPrint,Salandora/OctoPrint,Jaesin/OctoPrint