Added exceptions for code coverage.
Fixed testcases.
Improved resampling capabilities.
Fixed testcases.
Improved resampling code.