Moved inline 'fixup' script to external file