Improve Open Line feature. Add additional unit tests.