improve document details view and request handlers