Refactor to use elements.