Locations now working with fsm.js (and some clean up)

See if it is working as you wanted it to.