Refactor update lich