Added another revision with several improvements.
See README.md for details.