The MAXREFDES117 Arduino code was designed for the Arduino Uno, and it cannot be ported directly over to the Arduino MEGA. In order to get the code to run on Arduino MEGA, you will need to remove SoftI2CMaster.h entirely and replaced all I2C calls by their equivalents from the standard Wire library.