fix typo and add some tests.
add node_modules to gitignore.