Refactor configuration classes to fix compiler errors related to generic types.