Re-implement messaging to more general and provide more services.

This also includes a different approach to managing options using
classes instead of enums so we can have inheritance.
Fix license in pom.
Add missing license headers.