Made timeout values configurable.