Fixed animations, cleaned up lots of code