(a) The amount secured by the lien of a prime contractor is the unpaid part of the prime contract price less the aggregate amount secured by the liens of all subcontractors and subcontractors.
(b) Except as modified by subsection (c) and by section 258 of this title, the lien of a subcontractor is for the lesser of:
(1) the amount unpaid under his contract, or
(2) the part of the contract price
(A) remaining unpaid under the prime contract at the time the owner receives notification under section 256(e) of this title of the subcontractor's right to claim a lien, and
(B) any additional part of the prime contract price paid prior to filing of a notice of commencement under section 262 of this title.
(c) The lien of a subcontractor is reduced by the amounts owed by him to his subcontractor if the subcontractor has claimed a lien for the amounts.
(d) Except as modified by section 258 of this title, the lien of a subcontractor is for the amount unpaid under his contract, but not more than the lesser of:
(1) the part of the contract price
(i) remaining unpaid under the prime contract at the time the owner receives notification of the subcontractor's right to claim a lien, and
(ii) any additional part of the prime contract price paid prior to filing of a notice of commencement, or
(2) the part of the contract price remaining unpaid under the subcontract at the time the prime contractor received notification of the subcontractor's right to claim a lien.
(e) The notification to the owner or the prime contractor of a right to claim a lien may be given at any time after a subcontractor or subcontractor has entered into the contract pursuant to which his lien may arise. To be effective under subsections (b) and (d) the notice must be in writing and must be either delivered personally to or sent by registered or certified mail to the last known address of the person specified in the notice of commencement (see section 262 of this title) and must contain
(1) the name of the claimant,
(2) the name of the person with whom he contracted,
(3) a general description of the services and materials provided or to be provided
(4) the amount unpaid, whether or not due, to the claimant for the services or materials (if no amount is fixed by the contract, a good faith estimate of the amount shall be made),
(5) a statement that any payments to the prime contractor after the receipt of the notification will not reduce the amount of the claimant's lien; and, if the claimant is a subcontractor, a statement that any payments to the subcontractor after the notification has been received by both the owner and the prime contractor will not reduce the amount of the claimant's lien.