Added in caching to add a little bit of speed.