Removed ugly function pointer.
Merge branch 'feat/infer-refactor' into develop