Clean up tile cache code