Refactor to make other utilities easier