Refactoring, adding in Gandalf proxy and CLI tools