Use priority values as capabilities, plus other small changes