The costs and the expenses of any sale shall first be paid out of the proceeds. The balance thereof shall be applied first to the payment of tax claims, the oldest thereof having priority, municipal claims shall be next the oldest in point of lien having priority; and any surplus shall be distributed in accordance with law.
53 P.S. § 7291