Add some test modules, and some bugfixes.