Add caching everywhere

I had to re-indent your code to match the new wrapper. Everything was global before so I placed it inside a function executed once the dom has loaded. Added local storage caching to make the transition between fragments a little snappier. Also, you were making lots of jQuery calls for the exact same element (see l65 and l66 in the old code). I cached all these elements and replaced them elsewhere. Wherever you were using the string representation I switched it to ```ditto.el.selector```. It might be a good shout to replace all the ```ditto.el_id``` with just ```ditto.el``` too.