Add jshintrc
Remove dead code and write docs.