move all the nx bits in to one place