Update code. Add real mocha tests. Remove uneeded dependencies.