Improve logics and fix possible errors and colorized