Resolve performance issues
Merge pull request #105 from pass-by-value/performance_fixes

Resolve performance issues