Renamed messages::auto_ptr to unique_ptr
Moved input handling back to running.