Some bugfixes and add Jameson's ccall tests