Rules processing

Started rules processing for files.