Removed undeclared variables
Use correct production database name
Migrated to new iRODS module
Remove file type from iRODS query because it caused slow queries