Add tests, update jQuery and lo-dash

Just the stuff that has been sitting in the PR for ages.

jQuery has been updated to the stablish version.