Added tests and added lodash dependency