Merge pull request #7

Isolated caching and eliminating unnecessary pointers.