Merge pull request #32 from Tillsten/master

Cofidence intervall refactor
restored python2.6 compatibility
Reduced code duplication with extraction of penalty.