Made dependencies load correctly on stand alone. Moved main script to main.js