Removed unnecessary declaration.
Caching whether methods needs structure return.
More efficient cache key generation.