Merge pull request #1 from delitescere/master

Thread safe sending, and small refactor