extracted trading-related functions from init.lua and placed them into mob_trading.lua