Merge pull request #1 from martinhoefling/master

Several additions and fixed (see comment)
Merge pull request #2 from martinhoefling/master

Several fixes, added multiline support, added queue timeout