Fix couple issues, add more tests. Update readme.