Refactor doc display