Trim surplus lines; add pointer to top level