One of Wales's most historic buildings located in Llanidloes, has had work restoring and protecting it completed.