Cleanup
Implement --resampling option