Adding unit tests, and fixing comment treatment

Added unit tests, and updated the logic to fix the problem when comments
part of the line were not getting set. Also ensured that includes were
quoted