code cleanup; remove pymalloc calls