Reformat code

Command used:
astyle --style=allman -n $(find . -type f -iname '*.cpp' -o -iname '*.h') -xC100 -xL -xM -S -M12