Moved common functions into ancestor class