Move analysis into the Discrover library
Move conditional MI code into separate file