re-write AD and Broker scripts
Merge pull request #16 from 9whirls/nf

re-write AD and Broker scripts