Reset the location data first.
Added support for arbitary number bases.