misc refactoring, adding missing utils module