Code cleanup:
- removed trailing spaces
- expanded tabs to spaces
- checked for lines longer than 80 characters