Ensure clean build

Updated to remove BouncyCastle changes now on separate branch.