pythonic fixes

- Some statements (especially for clauses) were replaced with faster alternatives. 
- replaced string concats with formatting.
- replaced redundant keywords in if clauses.
- removed ;'s