Fixed Monetary Market modifications.

It wasn't worked when you had at least one offer on the market.
Moved the rest of the functions into the main namespace.