Move more logic from platform to platform_family