Removed old templates. Added map cache code