Minor cleanup and improvements; remove run loop.