Started work on a more generic scoring engine that emits frames

All the unit tests pass but the code at this stage is very horrid. I am
hoping that some nice sort of state machine will eventually emerge after
a lot of refactoring.