Change TX switch to ifs, add consistency check to Lorris