More refactoring
Merge branch 'stage1' of https://github.com/Isanderthul/paperbandit into stage1