Use 4 spaces for indenting JavaScript code
Fix several typos and potential bugs in algorithm.js
Make algorithm.js pass jslint
Merge pull request #1 from thenickperson/master

Various JavaScript fixes (now passes jslint)