Handled zero poly

Add helper function to remove zero coeff
Fix and optimize ToFormattedString function