Add application state, separate js files.

Use uriAnchor plugin to update url depending on search.