Service locator design pattern