Reduce code duplication in the documentation opening commands by adding some reusable methods