Renderer refactor

I didn't make any changes to the way the program operates. This pull is all refactors, mainly in the generate_headers and private parsing methods of the renderer class.