Fixes precedence issues, adds Python statements