Fixed bugs, typos and tested against PRODUCTION.