Implemented Set and Tree, improved API