split CPU operations out into lib6507