Formatted the code, converted spaces instead of tabs and fixed the preferences