some refactoring
debugging commit: empty message fixed, TODO: fix add_channel, update_secret
debug commit: partially fixed