Move component code into separate component manager