Updating clip.py, refactoring cli logic