added message type handling, message creation, and imported helper classes and apache lib