First functional version that runs rules accurately on files