2.1 part 1

Attempted to rewrite how messages are handled
general fixes