Cleaned up list scalar and elementwise C functions