Redo changes in #11, removed by #12

Sorry, I did a mess in git which removed the changes to have configurable timeouts.

While working on #12, I accidentally merged the branch configurable-timeout. So I reverted commit de4661e28d031e4de6361e5ab474112df984eb5e, and this removed the configurable timeouts code from master! So it's not part of release 0.3.1 :-(