Minor improvements: CustomTypeGenerator and custom type handling