Updated Application and ValidateCommand to use service locator.