moved tree cell layout handling to separated class