Modernize and clean-up blocks code

Includes removing copy of uuid module, since we no longer require 2.4 support
Fix executing context for new adaptation mechanism.