MOD: some code cleaning