Refactor manifest

No need to initialize manifest, because it's not in the parameter list
any more. Generate the manifest hash only when it is needed.