Removing static, supporting passing service locator for proper basePath detection