Made conformant with the current schema. Removed references to X_name tables, using 'name' columns instead.
Made conformant with the new schema. Using 'name' columns instead of X_name table joins.