some primrep corrections
improvements for FFI placeholders and marshalling