Minor updates to initialization: now including automatic key-updloading.