Extract out base functions, so that they're callable