perf fixes
perf fixes in select and code cleanup
reomved unnecessary copy statements
Merge pull request #53 from webconvforge/perf

Perf improvements