[General] Cleanup and refactoring of some shit.