key-value: added most of the functionality needed to wait and read keys and values. Need only to change the way values are written into config files (using sections). Will finish the work in the next patch