Automatic removal of animated objects

This patch removes the need of manually deleting animated objects.