Removed ng cache to make algorithm faster, as well removed destroy tree cleanup