Add decode() for Uri
Refactor (fix minor bug..)