Code style

Hi!
I have ran your code through autoformatter because the code style was far from being the best.
Also I have fixed a problem caused by forgotten C++ closing bracket.