Update getUrl function to build better URLs.
Add table names to all fields.