Added timeout flag and default. Fixes #25 and fixes #23