Create new file with comments removed, refactored out a lot of duplication.