Lots of changes for allowing curse handling