Cleanup
Integrated rigorous loss likelihood calculation