Major update, added message markers, bugfixes, cleanup, restructure message processing