Refactors some stuff, optimizes the .ini stuff.