Opaque pointers mode is enabled by default, no need to explicitly enable it.
Replace a switch statement used to validate arguments to known library functions with a more consistent table-driven approach and tighten it up.