Added Affiliate unique id to product and database. Cleaned up code.