cleaned up code a bit... modified how animations are done