Revert "Revert "Made URLs generic""

This reverts commit d6816bf167117dc8e86d80690264763d6716691c.
fixed the URL handling to account for the use of generic views