Refactored portfolio.js

Multiple refactors to fix a number of problems.  Broke out the code to
get Yahoo quotes into it’s own function in case we want to add get
quote functionality.