fixes and performance improvements
ignore
Merge pull request #1 from biemond/fixes

Fixes