Refactored form component initialization into constructor.