Update README.
Add generate "main" function.