more python 2.7 tweaks - moved functions out of DiscussionManager