Added support for automatically transforming IDs to links in generic views.
Debugged and refactored. Note that utils that should have gone into a previous commit are in this one.