Major overhaul to the CBW plugin