JS fixes and new resize plugin