another huge jquery update, tidy up