Added some comments to the generate_line method