Added basic animation functionality.

It's currently not modular at all and may not be efficient (I am not
entirely sure...), so don't feel like you have to use this because it's
here, there might be much better ways to do animation out there!