Performance - 3 optimizations
Performance feedback for Sergey #163
bug fix
Merge pull request #164 from lefthandedgoat/performance-163-2

Performance #163 2