Added error handling in compareDecisions(), added comments