cleanup and compat w/ latest SDK