Switched to use linux calling conventions for all functions