Cleanup, including renaming Resource to HalResource to avoid type hint issues.