Added warping functions, inspired by rmcgibbo's suggestions.