minor cleanup of tile chunk code
added caching to chunks