Initial version, still not presentable but we need it for testing TB2
Some more fonctions added