Move Query and PredictedResult to Engine.scala