Pr231

Merge the changes made for PR231 into the master branch. This includes fixes for the mTDC stuff (the TDC word number/TDC event number confusion) etc.

Some changes will be made in the master branch to remove specific references to PR231 data etc.