Refactoring based on feedback from PR numenta/nupic.fluent.server#12