bug in animations fixed; redundant code removed