Fixes for stable version, makinf it compatible with stonesense overlay.
Unfortunately the other branches are incompatible in different ways.