it took another long time to discover that the temple of yeench was a front for his organization , and still longer to discover that ling typically stayed in the core of the headquarters , which was not in the temple at all , but deep in bedrock , some distance away .