Move common functions to base class