Third pass at optimization

      Adds inbounds for summing up tdm, still the bottleneck
Fixes some bugs

      Fixed bugs in calculating the log posterior
      Decoupled the proposals to mix better