done refactor 4
refactor 4 was just a bunch of smaller refactors that i wanted to put together since they were small these included removing redundant or unused code, renaming variables to more readable names, fixing warnings or errors and just general readability improvements. Im now moving on to the final refactor which will be comments to explain the code i will try to use or edit the original comments to explain things better.