remove unused code
fix unit tests
simplify symbolic differentiation
remove unused code