made some small notes and added tests
Merge https://github.com/fulltilt/JSAlgs