[Enh] rewrite of the classes in different files and use of them by tp's work