Add dictionary support and more tests.