Remove unnecessary properties and make config injectable
Support defaults for Mage namespace