add TpResult::Config class and remove part of config code