Fix to issue #25

*Fixed trailing whitespaces/tabs and lines with just spaces/tabs.
*Changed whitespace to tab usage. Fixed indentation.
*Typo fix.
*Added missing </head> tag in a file.
*Compatibility fix for Python 3.0 print function.