Small refactor to clean up a bit.