Some refactoring in preparation for the default values of parameters