       return new Vector(0, 0)
 
   @s_mult: (vec, k) ->
+    ### Scalar multiple <vec> by <k> and return a new Vector. ###
     return new Vector(vec.x, vec.y).s_mult(k)
 
   @s_div: (vec, k) ->
+    ### Scalar divide <vec> by <k> and return a new Vector. ###
     return new Vector(vec.x, vec.y).s_div(k)
 
 
 class Particle
+  ### Class for representing a Particle and drawing it. ###
   constructor: (x, y, @mass, @color) ->
     @pos = new Vector(x, y)
     @vel = new Vector(0, 0)
 
 
   force: (pos, vel) =>
+    ### Get the force vector applied to this particle depending on mouse position. ###
+
     difference = Vector.subtract(MOUSE.pos, pos)
     # Set the minimum at 25 to avoid a mouse-singularity
     dist_sq = Math.max(difference.mag_sq(), 25)

    ctx.globalCompositeOperation = 'source-over'
    ctx.fillStyle = "rgba(0, 0, 0, 128)"
    ctx.fillRect(0, 0, @canvas.width, @canvas.height)
    #ctx.clearRect(0, 0, @canvas.width, @canvas.height)
    for particle in @particles
      particle.draw(ctx)

    window.requestAnimationFrame(@draw)

MOUSE =
  pos: 
    x: 0
    y: 0
  mass: 1
$ ->
  MOUSE = 
    pos: new Vector(0, 0)
    mass: 1
  animator = new Animator($("canvas"))

      @vel.y = -@vel.y * 0.5

  draw: (ctx) =>
    ### Draw this Particle using the context <ctx>. ###
    ctx.save()
    ctx.beginPath()

