Rewrote decision tree API and modified tests, all tests pass.