clean up old fitting code