Added initialization function to component.