Revert "Bug fixes and added lodash"

This reverts commit d488095dc8ff8e69c6ac5468064eaa9a01778106.
bug fixes