Add comments. Improve some API. Update README file.