Clean up transform and inverse_transform
Add first test
Test gradient descent
Test binary search