Moved js out to assets.
Refactoring js.