Component-wise refactor