refactor and preparations for relative tree displayer