IIFE adjustments and Animation expansion

some functions are now global again; Animation has been expanded and
works with instances of the same animation.