Adding register for run directive.

Requires more work on API side to be implemented.