refactor: Remove unused code in CLI and libs