Set calling convention
Refactoring