Merge pull request #117 from Bonder-MJ/master

fixes and speed improvements