Restructure doc into pages, update docstrings