main.js: add some verification and use proper return code.
main.js: add merchant methods and product schema.