Issue 284 animation state refactor

I'm leaning towards this approach so am submitting a PR in preference over the other approach.