Added C API fitting tools to speed up detection