Styling and other minor changes

Currently using astyle -A10 for auto-formatting C