Fix jQuery issue and minor changes.