Finish implementation and testing of msg-compile.

Closes #7.