Code cleaning + final output file.