Got animations working a bit.
Some refactoring work