Added flat URL for single portfolio
Refactored URL generation
Merge branch 'flat-portfolio-url'