lxd - Refactor