Ttype updated and code cleaning