Improved ui app structure. Implemented api module. Metric tree uses real data