centralized constructor for improving code readability and maintainability by centralizing logic.
verified the changes using debugging with breakpoints to ensure correct constructor delegation and initialization logic.
test case to confirm that the functionality remains consistent and correct after refactoring.
Comment From: jitokim
@ilayaperumalg Hi, could you please review my PR ?