Use uri() method.
Remove unused code.
Coding standards.