cleanup, added wait method to controller for testing purposes