Refactor a bit and correct to run on Ruby 2.0.0-p247 without warnings
Merge branch 'feature-dfa_context_mesg' into develop