move inference into new module
Merge pull request #4 from tomcollins/inference-events

move inference into new module