Minor refactor to remove some unnecessary code.