Minor changes to tests
Changed "extern_c" fns to "external"
Refactored Impala code to elim boilerplate