Added routing, push-state, history. Wrapped loader in an anonymous function.