Cleaned up main.js a bit. Added 'loading' text.