Created some unittests for the Animator Class.

Fixed some bugs that were catched throught the unittests.