Added sorting to .items() and .render()