Adding new dependencies and fix some bugs.