Added ability to configure lines, fixed existing bugs.
Added new expand and overlay routine