SOS-1120

I source formatted and fixed a lot of the code.