Fixed removeTrivial
Added UnitTest class for Bernstein
Tested removeTrivial