Revert "Dirty patch to support generating a complete script"

This reverts commit 0f93c9b0eeff0ffa4ecff3901bafed0a9066bc2b.