Fixed ifdef __cplusplus closing bracket. Removed trailing whitespace
Autoformatting
Code style changed according to common sense
Merge pull request #2 from AlexDaniel/master

Code style from user updated