Fixed up some bugs, and added future timeout code