cleaned/restructured code.
mapfragment now adds event markers.