Pull out router, generalize stores and hooks