fix broken constants
reimplement loading of older messages
stylistic improvements (hopefully)