Update test cases and fix bugs along the way.
Update README file.