Fixed failing tests. JSLint'ed some js files. #64