Minor but free performance improvements

Use *strpos()* instead of *substr()* for a minor but free memory improvement

![image](https://cloud.githubusercontent.com/assets/1324566/3894783/0c3d0ae8-2248-11e4-9fda-dc5c21a4f649.png)