Move code around a little

  * Pruning persistent maps is done in persistentmap module
  * Loading cache separated