Add basic logic of AndOrTree