Changed map api loading to only work on main page.