Fixing #8, and fixing some code standards (mix of tabs with spaces, some variable names, etc).