Added initializeMiddleware() and initializeService()