feature/18-add-typespecs

- long overdue addition of typespecs also resulted in a lot of cleanup of internal code
- testing message formats should be *much* simpler now