Hierarchy working, lines not..

Need to fix the lines and claculate the optimal size of viewports in
updateLayout function