python3 + general modules fixes + cleanup