Added support for timeouts (Issue #14)