Improved documentation.
Averaging across reference order.
Computation of BIC. Improved readability of code.
Removed obsolete code.
Remove obsolete code.