Added some more comments
Improved the way to parse each part of the line