Fixed the on-demand loading of animation and added necessary unit test. This closes #31