re-factored portfolio link functionality

re-factored portfolio link functionality and code comment cleanup