Clean up Javascript and stop animation from appending circles on last iteration