Move component instance creation into setup function