Refactored so that the docs is a separate module