Mod general check and code polish