Simplify timeout code
Make use of tiemout()