Improved the creation of lines