Properly sets index and level of timeline children
Minor refactoring of sortByDepth
Merge pull request #605 from yurydelendik/timeline-level

Properly sets index and level of timeline children