categories and totalMBLeft + bug fixes

added new function GetCategories and TotalMBLeft