Add timeout global variable to encapsulate timeout parameter in constructor.