Fix leaks in next.cpp.
Update README.