add __init__.py to use as package
some code improvements
fix error that raises because of the new API changes
Merge pull request #1 from Andre-487/master

Fix some troubles with changed API