updated to python3 + some other small fixes