Moving DOM queries into helper function.