fixes for issues 1729, 1778 and 1693; starting fix for issue 1753; embedded dependency cleanup