Refactored rpi2caster.py and moved portions of the code to functions so that it is more readable