Some Refactoring and redesign of location.  fixes #2