added api methods for adding and removing agent constructs, added test for API, added some comments elsewhere.