Remove wx functions from fit.cpp