Added support for FieldSpec.entityType and fixed compiler warnings