merged origin/dev to HG-307 and resolved conflict in MercuryApi.class.php