Addressed Ghislain's review comments
Refactored