exchange redeclaration now only happens if the initial declaration fails. removed unrelated files from the branch.