Restructured a bit use require.

Styles and JavaScript have been broken out; updated gulp file.