Move dependencies out of main.js

This will make our config.js 100% reusable for tests

Change-Id: I0da95e6faeb1e784c1bc319ea429a0aa32f1aee3
Merge "Move dependencies out of main.js"