Refactor GMM class to take momcond function as an argument
Clean up a bit