Fix parentheses issues, Python3 compat (print statement), and PEP8