in reply to find unique lines in two files

Yes there is a "better way to do it": please do yourself a favor: format your code consistently and indent it correctly.

I am sorry, I am doing this type of file comparison all the time and I might have some ideas from my experience, but I am not going to take the time to try to understand your code if you can't take the time to format it properly.

Please don't take this as as personal offense, correct formatting of the code is really essential.