Changed redirection & added tests.
added comments
added scripts/test.sh to run jasmine node tests.