Rewrite "low-level" functions (which parse inner <outline> nodes) to make it more simple.
Also, rewrite tests for this functions.