Scripting

Adds scripting support.