Fixing loop and variable casting, adding nodiff for certain files