De jquery

Remove some of the jQuery dependancy where it is easy.