Add an InitComponent method to avoid repetition.