Merge pull request #4 from pointhi/master

little changes and fixes