Refactor helpers.