Right now, a lot of the functionality determining the market operation is contained in the Substances package, when arguably that functionality should exist in it's own package. Substances should probably just be a type declaration package, which can be made visible to the other packages including the Market package.