Refactor dependencies into common file