LAC-58: prepare entities for algorithm. Rename some commands. Also, by Bogdan: make KeyDAO and NodeDAO to be singletons