Make sure there are no unresolved Futures, Future#wait timeout support, and few other minor fixes