[WIP] Scripting support

Some motivation: #117