CLI mode only bug fix, I don't know why but s:refresh() can't access.
and include some refactoring so that easily understand(deleted #do
command)
bugfix
improve for picking up next candidate color(now history managed)
refactored
refactor and  cleanup
refactor