Extract some private methods