Cleanup and refactoring
IW2D is a quite large repository, and navigating the code can sometimes be difficult or tedious. Here is a list of some aspects I wanted to clean up or refactor, but didn't have time to while working on the repository. Adding them as separate comments to allow commenting, reacting and linking to individual points.