move dart code from inline scripts to separate files