refactor Rakefile, updates template.json, postinstall script