move mod ffi into it's own file