simplifying cli, restarting in 'library' style