added 'entity' factory method
fixed erroneous class check
raised deployment target for 64bit compatibility