Removed compareBytes() and fixed issues with compareDynamicObjects().

Change-Id: I2c0a043bb843a31e8276404aef5387a099870ee2