Fixing bug if plan empty
Changing the QueryExecutor to take a config object on registering new query