Added custom function support for CoD4
Fix CoD4 native functions / restructuring / cleanup