Reworked location code into maps