Quick and dirty local positioning working! this really needs a lot of refactoring...