Minor clean up and python3-compliance