minor refactoring in the resty.core.base module.