A bit more refactoring for usage convenience.