Reconfigured to read fit settings from file. Compiles fine but untested.