Refactor config param handling