Extracted a useful function to utils.misc
Updated analysis code some more
Added smoothing to log odd score calculation
tidied up imports