Refactor router, notebooks_index