Debugged some errors with message handler and tested some of the
functionality