Add in OWFS support, volume measurement and tidy up some code