Move top level c-functions-calls to java