Very abstract tree implementation