Basic implementation with some tests

Compiles only with gcc for now, because test_dictionary() is using
nested functions.