Added tree modus and changed thread for excecuting packets