delete location and minor fixes in costManager