integrated operator wrapper and query generation into rails app and added some simple queries to the model