Code cleanup. Also started generalizing the Bcc processing branch.