Migrate tool implementation from the core_elements package