Intermediate Invoke method

Not very useful for the moment, but maybe later if we resolve the issue
that we have an http error 500 when we should get an error message
instead of a result.
Also changed the comparison between blocks.