Hookup document logic to basic UI