             }
             
             // auto period on double space
-            // TODO: timeout
-        
             self.handleAutoPeriod(model)
+
             // TODO: reset context
         }
         

	
	var keyboard_type: UIKeyboardType!
	var preKeyboardType = UIKeyboardType.Default
	
	var key_type: Bool!
	
    // TODO: why does the app crash if this isn't here?
    convenience init() {

		
		keyboard_type = proxy.keyboardType!
		
        if proxy.documentContextBeforeInput == nil {
			sug_word = " "
		}
		
		dispatch_async(dispatch_get_main_queue(), {
