refactoring generate.sh -- remove unneeded replace_zip, split generating cert and signing app, etc