updates to control-plane tests and tidy of core code