Misc code and memory cleanups
Some code cleanups, I noticed a few are handled by !29 (closed) already, but I hope not to clash too much with it.
Some code cleanups, I noticed a few are handled by !29 (closed) already, but I hope not to clash too much with it.