Code refactoring, #uri= method simplified