Fixed up the immunity system.
Added config support for immunity system.
Merge remote-tracking branch 'origin/master'