Codecleanup and reduce dry while getting configstrings