Implement check for the validity when splicing

Following are the condition that needs to be met
* start has to come before end
* target cannot be between start and end