Sync up more with tutorial code.