Topic formatting

@CHenrie Can you give this a quick look? It formats most of code with the style we wanted. Multiple vars per function are not included here.