fixed io issues (added constructor actually derive tree...)
deleted useless variables and fixed constructors
fixed bugs in new IO class
updated main