Change core code and add a location setting