Added functionality to make collection of lines unique so as to reduce calculation time on certain operations.