Isolated the magento API init