Large refactoring in konz_common and corrresponding changes in fovis tracker.