Added extrapolation test cases; fixed bugs; #21