Merge pull request #12 from blackwithwhite666/master

Some refactoring
Merge pull request #13 from blackwithwhite666/master

Add support for greenlet