Nullify static plugin references
Merge branch patch-1 from traksag
Clean up some repeating code
Remove need for static reference to plugin in Message class