Code refactoring for octo_replay
Merge branch 'master' of https://github.com/sebthebert/Octopussy