Properly scale y coordinates

Since canvas coordiantes start with 0, 0 in the upper-left-hand corner,
the maximum for y coordinates will be 0, and the minimum will be the height
of the browser window.
jsHint cleanup