mod: cleanup code