moved some more functions to libmysmartgrid