Convert tabs to spaces, Remove trailing whitespaces, Windows CR

I removed the trailing whitespaces, converted tabs to spaces, and remove Windows CR with the objective of standardizing the code.