Changed the way that conditions are expressed to make it more flexible.