Asteroids project in Javascript