Refactor to look nicer.