Added decode/encode url functions to views file