Re-write generator script to use package