Added comments, some error handling and touched up Portfolios

* Error handling in server.go - check headers
* Added comments throughout for readability
* Added a portfolio constuctor and the building blocks for
  custom portfolios