added spatial index and moved menus to top