Begin input stuff.
Add scoped_ptr impl.