Code refactoring

Code refactoring for debug more conveniently!