change functions to script local
Added suffix support
turn off debugging