ClassFactory now supports enums