move component drawing into it's own prototype