Refactoring and colored output