refactor of cli. now successfully adds, saves and removes hosts