Extract config unserialization in own function

This will allow us to reuse this code for config update commands
Implementation of the config update command
Rename function