Made the default result type code consistent with other engines, added comments