RSTP: code cleaning