Refactor component drawing.
Refactored clicking interaction.