Add constructor clientid parameter and set proper datatype for On callback function