Remove tree/count fields from Context and Query models

Fix #194.