All these required access to the sector's Level reference. The remaining references to the global 'level' variable are all in deprecated functions which is ok.