Add more tests
Fix bug in extrapolation.
Clean up