Add reset commands for win/buf, improve tests