Refactor Utils