Added Magento scripts and small fixes