Convert most of the functions in int module
Finally complete conversion of int module