merged changes from upstream (jquery taken out)