many upgrades and cleanups to the SDK