Update

Fixed #5, seems to be more stable but could use more testing
Merge pull request #18 from menovak/master

Update