Moving vtctl core code into a library.