Some fixes related to jQuery removal