Added function clear, see #7.