Moved scoped code