Formatted code

Tried to put code into kernel style. next up comments