Refactor the bookmark render to reduce code duplication.