add comments, test for LinesManager