Some prep for heroku, messaging bugfix, extracted some methods