mod: Code cleanup