New InputFiles class. Code rearrangement to fix what was broken/use better style.