Fix some forgotten messages conversions
Remove not used variables
Declare variables just once

Variables should be declared just once in a function.