Internally, it uses Guile. I'm afraid there might not be a good user interface to edit the Guile source files, but at least Guile is much more pleasant to work with than C and offers way less paper cuts. I think it's mostly used for reports. You might have to create a plugin to expose your own scripts in the UI.