consul-lib: Code cleanup