Fixed skeleton animation code and other more minor details