Rewrote caching!

Now works! Much faster.
Width fix

Fix regarding handling of width settings