Removed unused imports. Added support for generating an url based on a controller and view