So this is my honest advice and don't consider it discouragement: the code is trash and it's not because you're stupid it's because you don't know C or how to use any of the other tools for that matter (git, make). So it's exactly what you'd expect, you're not the first or last person in this situation. Scrap it, learn C (maybe start with K&R and then get up-to-date since that's C89), play around with it on some less ambitious projects, ask for help when you hit a wall, learn how to use git/make effectively, and only then come back to this project which you should 100% start from scratch. This isn't me being mean, I promise that you won't get anywhere if you keep this up. People who write proper code struggle with maintainability once code bases grow and you've used quicksand as a foundation, it will blow up in your face. Trust me, you'll have a much better time if you follow this advice. Learning stuff is maybe not as fun as tinkering but it's a prerequisite and we all had to do it. Maybe keep this around just so you see how far you've come and realize why this is so very bad.