As a life-long Jew, Jesus lived by rules: God's commandments.  But he explained that complying with the rules in and of themselves is not the whole point.  It's what's in your heart that counts ALSO.  He explained this when talking about committing adultery in practice and then extending it to one who thinks about committing adultery in his heart.

Rules are important; they provide the framework for doing God's will.  But it's also important to consider WHY the rules exist, and the answer to that is to bring us closer to God.  

A man who saves a person's life has done a good act for the life that he saved.  But if he saves the person's life because, e.g., it's his wealthy benefactor and he wants to keep the cash flowing his way, that's not an act in furtherance of God's will.

What's important about performing good acts is that they fulfill an important - wait for it - RULE:  Love one another.