Added typeAndCodec to createSourceElement, not implemented yet.