Big refactor. Added (untested) animations.