Fix float and int conversion to byte array. Fix test handler functions