Adjust assertions + add 1 local variables to functions + changes some messages code