Partial evaluation for derivatives

And input parsing