Moved `foreign' defs inside function defs
Simplify callback type.

Also, remove [callback] function.