Added main dependencies, added checking for git repo, with promise chaining for better synchronous handling