DRYing code and fixes
Merge branch 'master' of https://github.com/madebymade/ruby-raspberrypi-jenkins-ci-trafficlight