Since I began the journey of mod support I've seen many cases where my old code was sloppy and ineffecient. For example:
Today I spent a few hours cleaning up and completely re-writing these inventory scripts. I managed to shave off 267 lines of code. I also changed the way that items are stored. Originally there were 2 different data structures for each of the inventory sections. The perk section, the main section, and the hot bar. I have compressed all 3 of those sections into only 2 data structures. This means that scripts can access their information much more effiecently. It may also help reduce saving and loading times in the future when servers have lots of players to handle.
I was also able to completely remove the old inventory system for crafting which means that the games memory usage should be drastically reduced since I only use a single object for crafting options now.