Moved location code to separate namespace