(1) Every person given a lien by this article whose contract, either express or implied, is with the owner or reputed owner or his agent or other representative, is a principal contractor and all others are subcontractors; and in every case in which different liens are claimed against the same property, the rank of each lien, or class of liens, as between the different lien claimants, shall be dec