Separating primitive from complex types; added support for CreateRecord.