more performance imporvements
Merge pull request #191 from sbillard/master

more performance imporvements