Added timeout feature, closed all scopes, fixed canvas