New style classes

Made casses new style classes. Added functions for animations as well.
I think that I still need to make the connections and animations tag be
generated if it doesn't exist when its needed.