Basic implementation of products

Took all the stuff that @simonwh made in his pull request. Checked/fixed the stuff that @koppen complained about and hopes this will speed up the merging of this request ;-)