Improves navigation with javascript