revert and edit
some fixes
Merge branch 'master' of github.com:draringi/btlib