Add tables and fix tree