Pass prefix (and length) to script
Remove debug statements