Updates for diff-retarget branch

fixed issues with testnet; bug fixes