The diffs are large mainly because of prototyping changes.
input is from a file, not stdin. Added some support for this in teh parse function.