Refactor component config handling