Add more tests and resolve issues.