Ilios utilities refactor