Convert static class to use global container