Rewrite of XBMC module. All functions. Closes #38