intermediate status before I stuck on  cross domain requests.
 Python logic's been rebuilt using Flyweight pattern so it returns
proper tree structure from db.