Ported 'AddCatchTypeAction'
Cleaned up code.
Fixed coding style.
Merge pull request #407 from TheCommieDuck/addCatchTypeAction

Ported 'AddCatchTypeAction'.