Main now has modes for predict and learn; MongoDB improvements