Allow for comments in input file.
Some cleanup.