Micro-optimizations

 - removed some useless code
 - use `in` instead of `s.find(...) != 1` or  `s.find(...) == 1` wherever possible

---
`in` is supported by [Python 2.2](http://docs.python.org/release/2.2/lib/typesseq.html)