Added reset() to close(). Not sure if I'll keep it.