Bug fixes

-The history in the Javascript code isn't added to twice when the user
clicks a link.
-Code added to make sure the current page is set before attempting to
load the network.