Add support for invoking natives.
Fix several return issues.