Working animation system.

At some point it should be implemented in C++.