fixing formatting, adding headers where needed