Most importantly, added a function that can construct a Mysql query of a task based on the fields that are relevant to that task. This way we can do queries more efficiently on tasks that don't need a large number of fields to define the io's