clean up and speed improvement

doing the mage download first to speed thing up