Refactored and updated SimplifyUsingDistributiveLaws() to