Rename some variable and fix some error in Rafi