speed fixes
Merge pull request #46 from kived/speed-cache

speed fixes