minor refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
split out the history machinery into urlhistory.js...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>