Added support for reset, fixes enhancement #21.