Script support

A follow-up to #11, where traits already are treated.