Implemented category tree, improved speed getting category tree, adding cache to category tree