[Misc] Move io functions out of XBMC service