Code cleanup, don't use deprecated mgmt apis