Add unit testing framework, including doctests
Rename tests directory to unittests
Add tests for encapsulated control messages
Massive renaming, parameter changing and unit testing